Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@anchan828/gen-graphql-where-schema

Package Overview
Dependencies
Maintainers
1
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anchan828/gen-graphql-where-schema

coAuto generation for where type

  • 0.1.40
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@anchan828/gen-graphql-where-schema

Description

Generate where schema by directive

Quick Start

import { genWhereTypes } from "@anchan828/gen-graphql-where-schema";
import { buildASTSchema, printSchema } from "graphql";

const schema = `

type Test {
  id: ID
}

type Query {
  tests: [Test] @where
}

`;

printSchema(buildASTSchema(genWhereTypes(schema)));
//=>  type IDWhereOperator {
//      type: IDWhereOperatorType!
//      value: [ID]!
//    }
//
//    enum IDWhereOperatorType {
//      EQ
//      NOT_EQ
//      IN
//      NOT_IN
//    }
//
//    type Query {
//      tests(where: TestWhere): [Test]
//    }
//
//    type Test {
//      id: ID
//    }
//
//    type TestWhere {
//      id: [IDWhereOperator]
//    }

Options

TODO

Supoprted Types

For now, supported types are Basic Types (String, Int, Float, Boolean, ID), and Enum

License

MIT.

FAQs

Package last updated on 10 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc